/* 全局主题样式 */

/* 基础变量 */
:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --info-color: #17a2b8;
  
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --text-muted: #95a5a6;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #ecf0f1;
  
  --border-color: #e1e5e9;
  --border-light: #f1f3f4;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.2);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  --transition: all 0.3s ease;
}

/* 管理员主题 */
.admin-theme {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --admin-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --admin-sidebar: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
}

/* 重置样式 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* 通用工具类 */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.d-flex {
  display: flex;
}

.d-block {
  display: block;
}

.d-none {
  display: none;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.align-center {
  align-items: center;
}

.flex-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.m-0 {
  margin: 0;
}

.p-0 {
  padding: 0;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 1rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.p-1 {
  padding: 0.25rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 1rem;
}

/* 响应式工具类 */
@media (max-width: 768px) {
  .d-md-none {
    display: none;
  }
  
  .d-md-block {
    display: block;
  }
  
  .d-md-flex {
    display: flex;
  }
}

@media (max-width: 576px) {
  .d-sm-none {
    display: none;
  }
  
  .d-sm-block {
    display: block;
  }
  
  .d-sm-flex {
    display: flex;
  }
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

.pulse {
  animation: pulse 2s infinite;
}

/* 通用组件样式 */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.5;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--primary-color) 85%, black);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.btn-secondary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--bg-tertiary) 85%, black);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: color-mix(in srgb, var(--success-color) 85%, black);
  transform: translateY(-1px);
}

.btn-warning {
  background: var(--warning-color);
  color: white;
}

.btn-warning:hover:not(:disabled) {
  background: color-mix(in srgb, var(--warning-color) 85%, black);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger-color) 85%, black);
  transform: translateY(-1px);
}

.btn-info {
  background: var(--info-color);
  color: white;
}

.btn-info:hover:not(:disabled) {
  background: color-mix(in srgb, var(--info-color) 85%, black);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* 表单样式 */
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: var(--transition);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 10%, transparent);
}

.form-control.error {
  border-color: var(--danger-color);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.form-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.form-error {
  font-size: 0.75rem;
  color: var(--danger-color);
  margin-top: 0.25rem;
}

/* 表格样式 */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.table tbody tr:hover {
  background: var(--bg-secondary);
}

/* 模态框样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
}

/* 加载动画 */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-tertiary);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 状态徽章 */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 50px;
  text-align: center;
  white-space: nowrap;
}

.badge-primary {
  background: color-mix(in srgb, var(--primary-color) 15%, transparent);
  color: var(--primary-color);
}

.badge-success {
  background: color-mix(in srgb, var(--success-color) 15%, transparent);
  color: var(--success-color);
}

.badge-warning {
  background: color-mix(in srgb, var(--warning-color) 15%, transparent);
  color: var(--warning-color);
}

.badge-danger {
  background: color-mix(in srgb, var(--danger-color) 15%, transparent);
  color: var(--danger-color);
}

.badge-info {
  background: color-mix(in srgb, var(--info-color) 15%, transparent);
  color: var(--info-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .card {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
  }
  
  .form-control {
    padding: 0.625rem 0.875rem;
  }
  
  .table th,
  .table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8125rem;
  }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --text-muted: #95a5a6;
    
    --bg-primary: #2c3e50;
    --bg-secondary: #34495e;
    --bg-tertiary: #3d566e;
    
    --border-color: #4a5f7a;
    --border-light: #5d7291;
  }
}

/* Element Plus 消息提示样式 - 与首页保持一致 */
.el-message {
  border-radius: 12px !important;
  backdrop-filter: blur(20px);
  font-weight: 500;
  font-size: 14px !important;
  padding: 12px 16px !important;
  border: 1px solid rgba(0, 212, 255, 0.3) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 212, 255, 0.2) !important;
}

.el-message--success {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #10b981 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

.el-message--warning {
  background: rgba(251, 191, 36, 0.1) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
}

.el-message--error {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.el-message--info {
  background: rgba(0, 212, 255, 0.1) !important;
  color: #00D4FF !important;
  border-color: rgba(0, 212, 255, 0.3) !important;
}

.el-message .el-message__icon {
  font-size: 16px !important;
  margin-right: 8px !important;
}

.el-message .el-message__closeBtn {
  color: currentColor !important;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.el-message .el-message__closeBtn:hover {
  opacity: 1 !important;
}

.el-message .el-message__content {
  font-weight: 500 !important;
}

/* Element Plus 通知样式 - 与首页保持一致 */
.el-notification {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
  border: 1px solid rgba(0, 212, 255, 0.3) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 212, 255, 0.2) !important;
  backdrop-filter: blur(20px);
}

.el-notification__title {
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 16px !important;
}

.el-notification__content {
  color: #B0BEC5 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  white-space: pre-line !important;
}

.el-notification__icon {
  font-size: 20px !important;
}

.el-notification.el-notification--success .el-notification__icon {
  color: #10b981 !important;
}

.el-notification.el-notification--warning .el-notification__icon {
  color: #fbbf24 !important;
}

.el-notification.el-notification--error .el-notification__icon {
  color: #ef4444 !important;
}

.el-notification.el-notification--info .el-notification__icon {
  color: #00D4FF !important;
}

.el-notification__closeBtn {
  color: #B0BEC5 !important;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.el-notification__closeBtn:hover {
  opacity: 1 !important;
  color: #ffffff !important;
}



/* Element Plus 弹窗主题样式 - 与首页保持一致 */
.el-message-box {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
  border: 1px solid rgba(0, 212, 255, 0.3) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 212, 255, 0.2) !important;
  backdrop-filter: blur(20px);
}

.el-message-box__header {
  background: rgba(255, 255, 255, 0.05) !important;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2) !important;
  padding: 20px 24px 16px !important;
}

.el-message-box__title {
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 600 !important;
}

.el-message-box__content {
  padding: 20px 24px !important;
  background: transparent !important;
}

.el-message-box__message {
  color: #B0BEC5 !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
}

.el-message-box__btns {
  padding: 16px 24px 24px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border-top: 1px solid rgba(0, 212, 255, 0.15) !important;
}

.el-message-box .el-button {
  border-radius: 10px !important;
  padding: 10px 20px !important;
  font-weight: 500 !important;
  min-width: 80px !important;
  transition: all 0.3s ease !important;
}

.el-message-box .el-button--primary {
  background: linear-gradient(45deg, #00D4FF, #4F46E5) !important;
  border: none !important;
  color: white !important;
}

.el-message-box .el-button--primary:hover {
  background: linear-gradient(45deg, #00B8E6, #4338CA) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(0, 212, 255, 0.4) !important;
}

.el-message-box .el-button--danger {
  background: linear-gradient(45deg, #ef4444, #dc2626) !important;
  border: none !important;
  color: white !important;
}

.el-message-box .el-button--danger:hover {
  background: linear-gradient(45deg, #dc2626, #b91c1c) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4) !important;
}

.el-message-box .el-button--default {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #B0BEC5 !important;
}

.el-message-box .el-button--default:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(0, 212, 255, 0.3) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.el-message-box__status {
  color: #00D4FF !important;
  font-size: 24px !important;
}

.el-message-box__status.el-icon--warning {
  color: #fbbf24 !important;
}

.el-message-box__status.el-icon--error {
  color: #ef4444 !important;
}

.el-message-box__status.el-icon--success {
  color: #10b981 !important;
}

/* 暗色主题适配 */
.admin-theme .el-notification__title {
  color: #f9fafb !important;
}

.admin-theme .el-notification__content {
  color: #d1d5db !important;
}

.admin-theme .el-notification__closeBtn {
  color: #9ca3af !important;
}

.admin-theme .el-notification__closeBtn:hover {
  color: #f3f4f6 !important;
}

 